<div  class="keepershopadd" >
	<div class="container  contents bgw">
		<form class="row" ng-submit="postSend()" name="add_form">
			<div class="col-md-12">
				<div class="col-sm-10 col-sm-offset-2 form-horizontal">

					<div class="form-group">
						<label class="col-sm-2 control-label" ></label>
						<div class="col-sm-6 text-red">*为必填项</div>
					</div>
					<div class="col-sm-5">
						<div class="form-group">
							<label for="shoptel" class="col-sm-3 control-label text-right">
								<span class="text-red">*</span>
								电话
							</label>
							<div class="col-sm-9 titlePin" id="shoptel">
								<input type="text" class="form-control" ng-model="posts.tel" name="Tel" placeholder="输入固定电话或手机号，固定电话可以加-"  ng-pattern="config.textCheckJson.telephone" id="shopTel" required ng-focus="add_form.Tel.show=1" ng-blur="add_form.Tel.show=0"></div>
							<span class="help-block errorTitle"  ng-show="add_form.Tel.show && !add_form.Tel.$valid" ng-messages="add_form.Tel.$error" >
								<div   ng-message="required" >
									<span  ng-bind="config.textCheckErrorJson.telephone"></span>
								</div>
								<div class="text-red" ng-message="pattern">
									<span  ng-bind="config.textCheckErrorJson.telephone"></span>
								</div>
							</span>

						</div>

					</div>
					<div class="col-sm-5">
						<div class="form-group">
							<label for="openingDay" class="col-sm-4 control-label text-right">
								<span class="text-red">*</span>
								开业时间
							</label>
							<div class="col-sm-8 titlePin" id="openingDay">
								<input type="date" class="form-control" ng-model="posts.openingDay" value="{{}}"  name="openingDay" placeholder="输入开业日期" max="{{view.endtime|date:'yyyy-MM-dd'}}"   id="shopopeningDay" required ng-focus="add_form.openingDay.show=1" ng-blur="add_form.openingDay.show=0">

								</div>
							

							<span class="help-block errorTitle"  ng-show="add_form.openingDay.show && !add_form.openingDay.$valid" ng-messages="add_form.openingDay.$error" >
								<div   ng-message="required" >
									<span>请输入日期</span>
								</div>
							</span>
						</div>
					</div>
					<div class="col-sm-5">
						<div class="form-group">
							<label for="style" class="col-sm-3 control-label text-right">
								<span class="text-red">*</span>
								菜系
							</label>
							<div class="col-sm-9 titlePin" >
								<select ng-model="posts.cuisine" class="form-control" ng-options="t.code as t.text for  t in view.style" required>
									<option >--请选择--</option>
								</select>

								<span class="help-block errorTitle"  ng-show="add_form.style.show && !add_form.style.$valid" ng-messages="add_form.style.$error" >
									<div   ng-message="required" >
										<span>请选择</span>
									</div>
								</span>
							</div>
						</div>
					</div>
					<div class="col-sm-5">
						<div class="form-group">
							<label for="shoptel" class="col-sm-4 control-label text-right">
								<span class="text-red">*</span>
								人均消费
							</label>
							<div class="col-sm-7 titlePin" id="shoptel">
								<input type="text" class="form-control" ng-model="posts.avgprice" name="avgprice" placeholder="输入人均消费金额"  ng-pattern="/[0-9]/" id="shopTel" required ng-focus="add_form.avgprice.show=1" ng-blur="add_form.avgprice.show=0"></div>
							<div class=" help-block">元</div>
							<span class="help-block errorTitle"  ng-show="add_form.avgprice.show && !add_form.avgprice.$valid" ng-messages="add_form.avgprice.$error" >
								<div   ng-message="required" >
									<span  >请输入人均消费</span>
								</div>
								<div class="text-red" ng-message="pattern">
									<span >必须为数字</span>
								</div>
							</span>

						</div>

					</div>
					<div class="col-md-10">
						<div class="form-group area " style="margin-left:-7%">
							<label class="col-sm-2 control-label text-right">
								<span class="text-red">*</span>
								地区
							</label>
							<div class="col-sm-10">
								<div class="row">
									<div class="col-sm-4" ng-class="{'has-error':error.shopArea.code==0}" >
										<select ng-change="area1change()"  class="form-control" ng-model="area.area1"
  									ng-options="item.code as   item.name for item in areaJson1" name="area" required>
											<option value="">--请选择--</option>
										</select>
									</div>
									<div class="col-sm-4" ng-show="area.area2">
										<select class="form-control" ng-model="area.area2"
  									ng-options=" item.code as   item.name for item in areaJson2" ng-change="area2change()"></select>
									</div>
									<div class="col-sm-4" ng-show="area.area3">
										<select class="form-control" ng-model="area.area3"
  									ng-options="item.code as  item.name for item in areaJson3"></select>
									</div>
									<span class="help-block " ng-messages="add_form.area.$error" >
										<div   ng-message="required">请选择地区</div>
									</span>

								</div>
							</div>
						</div>
					</div>
					<div class="col-md-7">
						<div class="form-group" style="margin-left:-13%">
							<label for="shopaddress" class="col-sm-3 control-label text-right">
								<span class="text-red">*</span>
								地址
							</label>
							<div class="col-sm-9 titlePin" id="shopaddress">
								<input type="text" class="form-control" ng-model="posts.address" name="address" placeholder="输入您的详细地址"   id="shopTel" required ng-focus="add_form.address.show=1" ng-blur="add_form.address.show=0"></div>
							<span class="help-block errorTitle"  ng-show="add_form.address.show && !add_form.address.$valid" ng-messages="add_form.address.$error" >
								<div   ng-message="required" >
									<span>请输入地址</span>
								</div>

							</span>

						</div>
						<div class="form-group" style="margin-left:-13%">
							<label for="shoptel" class="col-sm-3 control-label text-right">
								停车场
							</label>
							<div class="col-sm-9 titlePin" id="shoptel">
								<textarea ng-model="posts.parkingDescription" style="resize: vertical;font-size:12px" class="form-control" ></textarea>
							</div>
							<span class="help-block errorTitle"  ng-show="add_form.parkingDescription.show && !add_form.parkingDescription.$valid" ng-messages="add_form.parkingDescription.$error" >
								<div   ng-message="required" >
									<span  ng-bind="config.textCheckErrorJson.text"></span>
								</div>
								<div class="text-red" ng-message="pattern">
									<span  ng-bind="config.textCheckErrorJson.text"></span>
								</div>
							</span>

						</div>
					</div>

<!-- 					<div class="col-md-3">
						<div ng-click="mapModal()">
							<img ng-show="view.map" ng-src="{{view.map}}"/>
							<span class="btn btn-link" ng-show="!view.map">
								暂时未选择地图
								<br>点击选择地图{{posts.latitude}},{{posts.longitude}}</span>
						</div>
					</div> -->
					
					<div class="col-md-10">
						<div class="form-group" style="margin-left:-7%">
							<label for="shoptel" class="col-sm-2 control-label text-right">
								商家介绍
							</label>
							<div class="col-sm-10 titlePin" id="shoptel">
								<textarea ng-model="posts.description" style="resize: vertical;font-size:12px" class="form-control"></textarea>
							</div>
							<span class="help-block errorTitle"  ng-show="add_form.description.show && !add_form.description.$valid" ng-messages="add_form.description.$error" >
								<div   ng-message="required" >
									<span  ng-bind="config.textCheckErrorJson.telephone"></span>
								</div>
								<div class="text-red" ng-message="pattern">
									<span  ng-bind="config.textCheckErrorJson.telephone"></span>
								</div>
							</span>

						</div>

					</div>

					<div class="col-md-10 ">
						<div class="form-group user-list" style="margin-left:-7%">
							<label for="shoptel" class="col-sm-2 control-label text-right">
								<span class="text-red">*</span>
								商家图片
							</label>
							<div class="pull-left titlePin" id="picshow">
								<table >
									<tr>
										<td ng-repeat="pic in view.picurl" >
											<div  class="piclist" ng-mouseover="imgedit=1" ng-mouseleave="imgedit=0">
												<img ng-src="{{pic.url}}"/>
												<div ng-show="imgedit==1" class="imgedit " >
													<A><i ng-click="removeImg($index)" class="glyphicon glyphicon-remove"></i></A><br>
													<A ng-click="bigpicshwo(pic.url)">查看大图</A>
													<a ng-click="setCover(pic.url)">设为封面</a>
												</div>
											</div>
										</td>

									</tr>
								</table>

							</div>
							<div class="col-sm-2">
								<div class="add" style="width:100px" ng-click="addpic()">

									<span class="iconadd"> <i class=" glyphicon glyphicon-plus"></i>
									</span>

								</div>
							</div>
						</div>

					</div>

					<div class="col-sm-10 col-sm-offset-2">
						<div class="row">
							<div class="col-sm-3">
								<a class="btn btn-default btn-block" ng-click="goto('shop')">返回</a>
							</div>
							<div class="col-sm-3 col-sm-offset-1">
								<button class="btn btn-danger btn-block" ng-disabled="!add_form.$valid" ng-click="senposts(1)">确定</button>
							</div>
						</div>
					</div>
				</div>
			</div>
		</form>
	</div>
</div>
<div class="modal fade bs-example-modal-sm" id="map" aria-hidden="true" style="display: none;">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header " >
				<button type="button" class="close" data-dismiss="modal">
					<span aria-hidden="true">&times;</span>
					<span class="sr-only">Close</span>
				</button>
				<h4 class="modal-title">选择地理位置</h4>
			</div>
			<div class="modal-body" id="mapin" style="height:400px"></div>
			<div class="modal-footer">
				<div class="col-md-3 col-md-offset-1">
					<div class="btn btn-danger btn-block" ng-click="resetpostion()">重新定位</div>
				</div>
				<div class="col-md-3 col-md-offset-1">
					<div class="btn btn-danger btn-block" ng-click="setpostion()">确定</div>
				</div>
				<div class="col-md-3 col-md-setoff-1">
					<div class="btn btn-default btn-block" data-dismiss="modal">关闭</div>
				</div>
			</div>
		</div>
		<!-- /.modal-content -->
	</div>
	<!-- /.modal-dialog -->
</div>


<div class="modal fade bs-example-modal-sm" id="addpic" aria-hidden="true" style="display: none;">
	<div class="modal-dialog">
		<div class="modal-content">
			<form  enctype="multipart/form-data" id="iimgform">
				<div class="modal-header " >
					<button type="button" class="close" data-dismiss="modal">
						<span aria-hidden="true">&times;</span>
						<span class="sr-only">Close</span>
					</button>
					<h4 class="modal-title">上传图片</h4>
				</div>
				<div class="modal-body" style="overflow:hidden">
					<div class="col-md-12">
						<div class="col-sm-6">
							<div class="picin">
								<img ng-src="{{tempic}}" ng-show="tempic"/>
								<div class="emputy"  ng-hide="tempic"></div>
							</div>
						</div>
						<div class="col-sm-6">
							<div class="picerror"></div>
							<div class="pictitle">
								图片必须为以下格式:
								<br>
								bmp,jpeg,jpg,gif
								<br>图片大小小于2M</div>

							<div class="upload">
								<label class="btn btn-block btn-default" for="uploadfile" ng-bind="tem.uploadTitle"></label>
								<input  class="hide" type="file" id="uploadfile" ng-model="tempic" onchange="angular.element(this).scope().temimgshow(this)"
 name="file" class=""/>
							</div>
						</div>
					</div>
				</div>
				<div class="modal-footer">
					<div class="col-md-3 col-md-offset-3">
						<div class="btn btn-danger btn-block" ng-click="sendimg(this)">确定</div>
					</div>
					<div class="col-md-3 col-md-setoff-1">
						<div class="btn btn-default btn-block" data-dismiss="modal">关闭</div>
					</div>
				</div>
			</form>
		</div>
		<!-- /.modal-content -->
	</div>
	<!-- /.modal-dialog -->
</div>

<div class="modal fade bs-example-modal-sm" id="bigpic" aria-hidden="true" style="display: none;">
	<div class="modal-dialog">
		<div class="modal-content">
			<form  nctype="multipart/form-data" id="iimgform">
				<div class="modal-header " >
					<button type="button" class="close" data-dismiss="modal">
						<span aria-hidden="true">&times;</span>
						<span class="sr-only">Close</span>
					</button>
					<h4 class="modal-title">查看大图</h4>
				</div>
				<div class="modal-body" style="overflow:hidden">
					<img ng-src="{{view.bigpic}}" style="max-width:100%"/>
				</div>
				<div class="modal-footer">
					<div class="col-md-3 col-md-setoff-1">
						<A class="btn btn-default btn-block" href="{{view.bigpic}}" target="_blank">新窗口打开</A>
					</div>
					<div class="col-md-3 col-md-setoff-1">
						<div class="btn btn-default btn-block" data-dismiss="modal">关闭</div>
					</div>
				</div>
			</form>
		</div>
		<!-- /.modal-content -->
	</div>
	<!-- /.modal-dialog -->
</div>